package be.bonamis.umpire.ui.client.places;

import be.bonamis.projects.umpire.business.dto.UmpireDTO;

import com.google.gwt.place.shared.Place;
import com.google.gwt.place.shared.PlaceTokenizer;

public class WhoPlace extends Place {

	private String name;
	private UmpireDTO umpire;
	
	public static class Tokenizer implements PlaceTokenizer<WhoPlace>{

		@Override
		public WhoPlace getPlace(String token) {			
			return new WhoPlace(token, null);
		}

		@Override
		public String getToken(WhoPlace place) {			
			return place.getName();
		}
		
	}

	public WhoPlace(String token, UmpireDTO dto) {
		this.name = token;
		this.umpire = dto;
	}

	public String getName() {
		return name;
	}

	public UmpireDTO getUmpire() {
		return umpire;
	}
}
